/*
 * =====================================================================================
 *
 *       Filename:  temp_observer.cpp
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  10/03/2010 06:46:54 AM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Ken Chen (Ziliang), zlchen.ken@gmail.com
 *        Company:  EMC
 *
 * =====================================================================================
 */

#include "temp_observer.h"

TemperatureObserver::TemperatureObserver()
	: itsTemp( 0.0 )
{
}

void TemperatureObserver::update( Observable* subject )
{
	TemperatureSensor* ts = dynamic_cast<TemperatureSensor*>( subject );
	if( ts != NULL )
	{
    itsTemp = ts->getTemperature();
    //	std::cout << itsTemp << std::endl;
	}
}

